<template>
  <div class="goods">
    <goods-list-item v-for="(item,index) in goods" :goods-item="item" :key="index"/>
  </div>
</template>

<script>
// <!--引入显示用户真实的数据-->
import GoodsListItem from "./GoodsListItem";

export default {
  name: "GoodsList",
  components: {
    GoodsListItem
  },
  props: {
    goods: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>
.goods {
  display: flex;
  /*设置属性 , 不包裹 , 指定宽度 , 往一行塞*/
  flex-wrap: wrap;
  /*数据一行均等分*/
  justify-content: space-around;
  padding: 2px;
}


</style>
